Conditions | 5 |
Paths | 2 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | const {jsonPrettify} = require('./jsonSnip.js') |
||
25 | export function removeQuotes (str) { |
||
26 | // if the passed string has matching encapsulating quotes these are removed |
||
27 | if ((str.substr(0, 1) === '\'' && str.substr(-1) === '\'') || |
||
28 | (str.substr(0, 1) === '"' && str.substr(-1) === '"')) { |
||
29 | return str.substr(1, str.length - 2) |
||
30 | } else { |
||
31 | return str |
||
32 | } |
||
33 | } |
||
34 |